<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改外派月账单')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-bill-edit" th:object="${staffingMonthBill}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">项目：</label>
                <div class="col-sm-8">
                    <input name="projectId" th:field="*{projectId}" class="form-control" type="hidden" >
                    <input name="projectName" th:value="*{projectName}"  class="form-control" type="text" disabled>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">项目人员：</label>
                <div class="col-sm-8">
                    <input name="personId" th:field="*{personId}" class="form-control" type="hidden" >
                    <input name="personName" th:value="*{personName}"  class="form-control" type="text" disabled>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">年：</label>
                <div class="col-sm-8">
                    <input name="billYear" th:field="*{billYear}" class="form-control" type="text" required disabled>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">月：</label>
                <div class="col-sm-8">
                    <input name="billMonth" th:field="*{billMonth}" class="form-control" type="text" required disabled>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">全勤天数：</label>
                <div class="col-sm-8">
                    <input name="fullDayCount" th:field="*{fullDayCount}" class="form-control" type="text" required th:disabled="${!@permission.isPermitted('erp:bill:edit')}">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">出勤天数：</label>
                <div class="col-sm-8">
                    <input name="normalDayCount" th:field="*{normalDayCount}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">缺勤天数：</label>
                <div class="col-sm-8">
                    <input name="absentDayCount" th:field="*{absentDayCount}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">1倍加班小时数：</label>
                <div class="col-sm-8">
                    <input name="overtimeHour1" th:field="*{overtimeHour1}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">1.5倍加班小时数：</label>
                <div class="col-sm-8">
                    <input name="overtimeHour2" th:field="*{overtimeHour2}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">2倍加班小时数：</label>
                <div class="col-sm-8">
                    <input name="overtimeHour3" th:field="*{overtimeHour3}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">3倍加班小时数：</label>
                <div class="col-sm-8">
                    <input name="overtimeHour4" th:field="*{overtimeHour4}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">其他费用：</label>
                <div class="col-sm-8">
                    <input name="otherFee" th:field="*{otherFee}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">工时费用：</label>
                <div class="col-sm-8">
                    <input name="workFee" th:field="*{workFee}" class="form-control" type="text"  th:disabled="${!@permission.isPermitted('erp:bill:edit')}">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">加班费：</label>
                <div class="col-sm-8">
                    <input name="overtimeFee" th:field="*{overtimeFee}" class="form-control" type="text" th:disabled="${!@permission.isPermitted('erp:bill:edit')}">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">报销费用：</label>
                <div class="col-sm-8">
                    <input name="expenseFee" th:field="*{expenseFee}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">报销结算费用：</label>
                <div class="col-sm-8">
                    <input name="expenseRateFee" th:field="*{expenseRateFee}" class="form-control" type="text" th:disabled="${!@permission.isPermitted('erp:bill:edit')}">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">总结算费用：</label>
                <div class="col-sm-8">
                    <input name="totalFee" th:field="*{totalFee}" class="form-control" type="text" th:disabled="${!@permission.isPermitted('erp:bill:edit')}">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">已结算费用：</label>
                <div class="col-sm-8">
                    <input name="billedFee" th:field="*{billedFee}" class="form-control" type="text" disabled>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">已收费用：</label>
                <div class="col-sm-8">
                    <input name="payedFee" th:field="*{payedFee}" class="form-control" type="text" disabled>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">收款截止期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="expireTime" th:value="${#dates.format(staffingMonthBill.expireTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" th:disabled="${!@permission.isPermitted('erp:bill:edit')}">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <textarea name="description" class="form-control">[[*{description}]]</textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "erp/bill";
        $("#form-bill-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-bill-edit').serialize());
            }
        }

        $("input[name='expireTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>